<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><?php echo G_SITENAME ?></title>
        <script language="javascript" type="text/javascript" src="scripts/jquery-1.7.1.min.js"></script>
        <script language="JavaScript">
            function keyboardkey()
            {
                if (event.ctrlKey && event.keyCode == 78) alert('WELCOME !');
                else if (event.shiftKey) alert('WELCOME !');
            }
        </script>
        <link REL="StyleSheet" type="text/css" href="core/tpl/<?php echo G_TEMPLATE ?>/site.css"/>
        <link REL="StyleSheet" type="text/css" href="loginTpl/color_<?php echo G_CSS_ID ?>/clc.css"/>
        <link REL="StyleSheet" type="text/css" href="loginTpl/bar_<?php echo G_BAR_Type ?>/bar.css"/>
        <link rel="StyleSheet" type="text/css" href="<?php echo $skindir ?>css/style.css">
    </head>
<!-------------------------头部栏目效果脚本开始---------------------------------->

<script type="text/javascript">
$(function(){
$(".nav li").click(function(){
$(".nav li").eq($(this).index()).addClass("cur").siblings().removeClass("cur");
})
})
</script>

<!-------------------------头部栏目效果脚本结束---------------------------------->
<style>
a.select {
	color: #F00;
	font-size: 12px;
}/*选中的样式*/
.left_td3 {
	color: black;
	height: 25px;
	border-bottom: solid 1px #b8b8b7;
	border-right: solid 1px #b8b8b7;
}
.le_td0 {
	border-bottom: solid 1px #b8b8b7;
}
.le_td3 {
	border-left: solid 1px #b8b8b7;
}
.le_td3 .co {
	color: #0000FF;
}
.le_td {
	border-bottom: solid 1px #b8b8b7;
	PADDING-RIGHT: 0px;
	DISPLAY: inline-block;
	BACKGROUND: url(<?php echo $skindir ?>img/left_54.gif) repeat-x 0px 0px;
	PADDING-BOTTOM: 0px;
	PADDING-TOP: 0px
}
.le {
	font-size: 13px;
}
.le_tt {
	BACKGROUND: url(<?php echo $skindir ?>img/logo.png) center center no-repeat;
	PADDING-BOTTOM: 0px;
	PADDING-TOP: 0px;
}
.onlineNum{ 
position:static;
margin:10px;
height:20px;
line-height:20px;
color:#ffffff;
font-weight:bold;
cursor: pointer; 
}
</style>
<script>
var t=<?php echo $time ?>*1000;

var getMonthWeek = function (a, b, c) { 

var date = new Date(a, parseInt(b) - 1, c), w = date.getDay(), d = date.getDate(); 
return Math.ceil( 
(d + 6 - w) / 7 
); 
};
function RefDate()
{
	t+=1000;
	var d=new Date(t);
	var day=d.getDate();
	var mon=d.getMonth()+1;
	var w=new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
	$("#nowtime").html("<div>"+d2(mon)+"月"+d2(day)+"日</div><div>"+w[d.getDay()]+"</div><div>"+(d2(d.getHours())+":"+d2(d.getMinutes())+":"+d2(d.getSeconds()))+"</div>");
	window.setTimeout("RefDate()",1000);	
}
function d2(v)
{
	if(parseInt(v)<=9)
		return '0'+v;
	else
		return v;	
}
var ItemClickName='';
var _gametype=0;
$(document).ready(function(e) {
	RefDate();
	$(".nav a").bind("click",function(b){
		var tag=$(this).attr("href");
		var id=parseInt(tag.replace("#tab",""));
		_gametype=id;
		$(".top01 div[class=tab_content]").hide();
		$(tag).show();
		if(ItemClickName!="" && ItemClickName!="帐号管理")
		{
			$(tag).find(".menuLv02 a").each(function(index, element) {
				if($(element).text()==ItemClickName) 
				{
					window.top.mainFrame.location.href=($(element).attr("href"));	
				}  
			});
		}
		//var url=window.top.mainFrame.location.href;
		//url=url.replace(/gametype=(\d)/g,"")+"&gametype="+id;
		//window.top.mainFrame.location.href=url;
	});	  
	$(".menuLv02 a").bind("click",function(e){
		ItemClickName=$(this).text();
	});
	$(".nav li").eq(0).addClass("cur"); 
	myTimeRenewONum();
	$(".onlineNum").click(function(){
	  window.top.mainFrame.location.href = 'op.php?op=agent&fp=online_3d&gametype=' + _gametype;
	  $().reNewOnlineNum();
	});
});
$.fn.reNewOnlineNum = function(){
  $.get('op.php?op=agent&fp=online_3d&gametype={gametype}&numOnly=1', function(redata){
    $("b.onlineNum2").text(parseInt(redata)); 
  });
};

function myTimeRenewONum(){
  $().reNewOnlineNum();
  setTimeout('myTimeRenewONum()', 1800000); // reflash each 30 min
}
</script>
</head><body style="margin:0; ">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr>
    <td width="240" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="240" height="60" class="le_tt">
        <tr>
          <td align="center" id="nowtime" style="padding-left:150px;padding-right:10px;color:#ffffff;font-weight:bold"></td>
        </tr>
      </table></td>
    <td><table class="top4" height="40" width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="40"align="left" style="float:left; width:100%" nowrap="nowrap"><DIV class=navigation>
              <DIV class=layout>
                <UL class="nav">
                  <?php echo $tabs_menu_list ?>
                </UL>
              </DIV>
            </DIV></td>
        </tr>
        </table>
        <table class="top4" height="40" width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr width="100%" bgcolor="#742D18">
          <td height="20" valign="top" style="width:500px;"><div class="top01" style="padding-left:5px; width:100%; ">
              <?php echo $tab_container_list ?> 
              </div>
            </td>
            <td valign="top"><?php echo $showOnLineNum ?>&nbsp;&nbsp;<span class="onlineNum"><?php echo $myInfo ?></span></td>
        </tr>
      </table></td>
  </tr>
</table>
